#!/bin/bash
# wrfpost_pdf2png.sh

if [ $# -lt 3 ]; then
    echo "Input arguments number must equal 3. QUITING."
    exit 1
else
    infile=$1
    outfile=$2
    outpath=$3
    echo $infile $outfile $outpath

    cd $outpath
    gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=png16m -r100 -sOutputFile=$outpath/$outfile%d.png $infile
fi
